#define _CRT_SECURE_NO_WARNINGS 1
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'

int main() {
	ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
	ll a, b, c; cin >> a >> b >> c;
	ll t1 = max({ a,b,c });
	ll t2 = a + b + c - t1;
	cout << max(t1, t2) << " " << min(t1, t2) << endl;
	return 0;
}